import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/home/home.vue'
import EchartView from '../views/demo/echart/index.vue'
import DraggableView from '../views/demo/draggable/index.vue'
import ScrollView from '../views/demo/scroll/index.vue'
import Tab1View from '../views/demo/tab1/index.vue'
import SwiperView from '../views/demo/swiper/index.vue'
import AnimateView from '../views/demo/animate/index.vue'
import SvgView from '../views/demo/svg/index.vue'

import Three1View from '../views/threejs/three1/index.vue'
import Three2View from '../views/threejs/three2/index.vue'
import Three3View from '../views/threejs/three3/index.vue'
import Canvas1View from '../views/canvas/canvas1/index.vue'
import Canvas2View from '../views/canvas/canvas2/index.vue'
import Canvas3View from '../views/canvas/canvas3/index.vue'
import Canvas4View from '../views/canvas/canvas4/index.vue'
import Mouse1View from '../views/timeMouse/mouse1/index.vue'
import Node1View from '../views/node/node1/index.vue'
import Code1View from '../views/code/code1/index.vue'

import CeshiView from '../views/ceshi/index.vue'
import SettingView from '../views/settings/settings.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      alias: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/demo/echarts',
      name: 'demoEcharts',
      component: EchartView,
    },
    {
      path: '/demo/draggable',
      name: 'demoDraggable',
      component: DraggableView,
    },
    {
      path: '/demo/tab1',
      name: 'demoTab1',
      component: Tab1View,
    },
    {
      path: '/demo/scroll',
      name: 'demoScroll',
      component: ScrollView,
    },
    {
      path: '/demo/swiper',
      name: 'demoSwiper',
      component: SwiperView,
    },
    {
      path: '/demo/animate',
      name: 'demoAnimate',
      component: AnimateView,
    },
    {
      path: '/demo/svg',
      name: 'demoSvg',
      component: SvgView,
    },
    {
      path: '/threejs/three1',
      name: 'three1',
      component: Three1View,
    },
    {
      path: '/threejs/three2',
      name: 'three2',
      component: Three2View,
    },
    {
      path: '/threejs/three3',
      name: 'three3',
      component: Three3View,
    },
    {
      path: '/timeMouse/mouse1',
      name: 'mouse1',
      component: Mouse1View,
    },
    {
      path: '/canvas/canvas1',
      name: 'canvas1',
      component: Canvas1View,
    },
    {
      path: '/canvas/canvas2',
      name: 'canvas2',
      component: Canvas2View,
    },
    {
      path: '/canvas/canvas3',
      name: 'canvas3',
      component: Canvas3View,
    },
    {
      path: '/canvas/canvas4',
      name: 'canvas4',
      component: Canvas4View,
    },
    {
      path: '/code/code1',
      name: 'code1',
      component: Code1View,
    },
    {
      path: '/node/node1',
      name: 'node1',
      component: Node1View,
    },
    {
      path: '/ceshi',
      name: 'ceshi',
      component: CeshiView,
    },
    {
      path: '/settings',
      name: 'settings',
      component: SettingView,
    },
    // {
    //   path: '/about',
    //   name: 'about',
    //   // route level code-splitting
    //   // this generates a separate chunk (About.[hash].js) for this route
    //   // which is lazy-loaded when the route is visited.
    //   component: () => import('../views/AboutView.vue'),
    //   // component: () => import('../views/AboutView.vue'),
    // },
  ],
})

export default router
